package com.xxtx.trade.common.enums;

public enum ExportEnum {
    SUCCESS(2,"成功"),
    FAIL(1,"失败"),
    WAITING(0,"正在处理中");

    private String msg;
    private int code;

    ExportEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
    public static String description(int code) {
        for (ExportEnum state : ExportEnum.values()) {
            if (state.code == code) {
                return state.msg;
            }
        }
        return null;
    }
}
